package com.world.rickcloudendpoint.logic.net;

import com.world.rickcloudendpoint.message.AbstractNetMessage;
import com.world.rickcloudendpoint.service.net.session.NetSession;
import io.netty.channel.Channel;
import io.netty.handler.codec.http.HttpRequest;
import io.netty.handler.codec.http.HttpResponse;
import lombok.extern.log4j.Log4j2;

/**
 * @description: 消息的真正处理
 * @author: jlsong
 * @date: 2021/12/23 23:27:19
 * @version: 1.0
 */
@Log4j2
public class NetMessageProcessLogic {

    /**
     *  netty会话消息处理
     * @param message 消息
     * @param netSession netty会话
     */
    public void processMessage(AbstractNetMessage message, NetSession netSession){

    }


    /**
     *  Http 协议 消息处理
     * @param message 消息
     * @param request 处理请求
     * @return
     */
    public HttpResponse processMessage(AbstractNetMessage message, HttpRequest request){
        return null;
    }


    /**
     * web socket 协议处理
     * @param message 消息
     * @param channel netty 通道
     */
    public void processWebSocketMessage(AbstractNetMessage message, Channel channel) {

    }
}
